<!--
 * @Descripttion: 
 * @Author: jhw
 * @Date: 2023-12-13 14:43:30
 * @LastEditors: jhw
 * @LastEditTime: 2023-12-13 15:35:23
-->
<template>
  <div>
    3.指令测试按钮loading 防抖<br />
    <!-- <el-icon class="is-loading"> <Loading /> </el-icon> -->
    <el-button v-loadingBtn="handleTest">点击测试下哦</el-button>

    <!-- <el-button
      ><el-icon class="is-loading"> <Loading /> </el-icon>点击测试下哦</el-button
    > -->
  </div>
</template>

<script setup lang="ts">
// import { Loading } from '@element-plus/icons-vue';

const handleTest = async () => {
  const res = await new Promise((resolve) => {
    setTimeout(() => {
      resolve(123);
    }, 2000);
  });
  console.log(res);
};
</script>

<style scoped></style>
